
import request from '@/utils/request';
import { Result } from './definitions/Result';
import { Banner } from './definitions/Banner';
import { ResultListBanner } from './definitions/ResultListBanner';


export class BannerAdminApiController {

    static addUsingPOSTPath: string = "/v1/api/banner";
    /// 新增轮播
    async addUsingPOST(data: Banner, headers?: any):  Promise<any> {
      return request(`/v1/api/banner`, {
        method: "POST",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static updateUsingPUTPath: string = "/v1/api/banner";
    /// 编辑轮播
    async updateUsingPUT(data: Banner, headers?: any):  Promise<any> {
      return request(`/v1/api/banner`, {
        method: "PUT",
        data: JSON.stringify(data) ,
        headers: headers,
      }) as Promise<any>;
    }
    
    static pageUsingGETPath: string = "/v1/api/banner/list";

    async pageUsingGET( headers?: any) : Promise<ResultListBanner> {
      return request(`/v1/api/banner/list`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static getUsingGETPath: string = "/v1/api/banner/{id}";

    async getUsingGET(id: string,  headers?: any) : Promise<any> {
      return request(`/v1/api/banner/${id}`, {
        method: "GET",
        headers: headers,
      }) as Promise<any>;
    }
    
    static deleteUsingDELETEPath: string = "/v1/api/banner/{id}";

    async deleteUsingDELETE(id: string,  headers?: any) : Promise<any> {
      return request(`/v1/api/banner/${id}`, {
        method: "DELETE",
        headers: headers,
      }) as Promise<any>;
    }
    
}